import request from "@/utils/request";

import type {Searchcriteria,Searchcriteriatitle} from './model/membermodel'

const token='8d31e9ee-9c9a-412b-a90f-6f6c4ae6fca5'
const access_token='8d31e9ee-9c9a-412b-a90f-6f6c4ae6fca5'
// 获取会员专区搜索条件
export const requestSearchcriteria = ()=>{
    return request.get<any,any>('/moment/properties/filter/vip_zone?access_token='+token)
}

//获取视频列表
export const getVideoList=(pageSize:number, pageNum:number)=>{
    return request.post<any,any>('/moment/moments/collect/vip_zone/integrated',{},{
        params: {
            // access_token,
            pageSize,
            pageNum
    }  
    })
}

//按照浏览量
export const videoCourseCountDesc=(pageSize:number, pageNum:number)=>{
    return request.post<any, any>('/moment/moments/collect/video_course/viewCountDesc', {}, {
        params: {
            // access_token,
            pageSize,
            pageNum
        }
    })
}
 // 按销量 /apis/moment/moments/collect/video_course/sellCountDesc
 export const videoCourseSellCountDesc=(pageSize:number, pageNum:number)=>{
    return request.post<any, any>('/moment/moments/collect/video_course/sellCountDesc', {}, {
        params: {
            // access_token,
            pageSize,
            pageNum
        }
    })
}
//按照价格由高到低
export const videoCoursePriceDesc=(pageSize:number, pageNum:number)=>{
    return request.post<any, any>('/moment/moments/collect/video_course/priceDesc', {}, {
        params: {
            // access_token,
            pageSize,
            pageNum
        }
    })
}

//按照价格由低到高
export const videoCoursePriceAsc=(pageSize:number, pageNum:number)=>{
    return request.post<any, any>('/moment/moments/collect/video_course/priceAsc', {}, {
        params: {
            // access_token,
            pageSize,
            pageNum
        }
    })
}

// 按发布时间 /apis/moment/moments/collect/video_course/onsellTimeDesc
export const videoSellTimeDesc=(pageSize:number, pageNum:number)=>{
    return request.post<any, any>('/moment/moments/collect/video_course/onsellTimeDesc', {}, {
        params: {
            // access_token,
            pageSize,
            pageNum
        }
    })
}


//获取所有主题的函数
export const getMainTitle=()=>{
    return request.get<any,any>('/moment/activityZones/collect/default?access_token='+token)
}

//获取视频的的信息
export const getvideodetail=(id:number,source:string)=>{
    return request.get<any,any>('/moment/moments')
}